﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Easy.Mvc.Controllers;
using ZKEACMS.Demo.Service;
using Easy.Mvc.Authorize;
using ZKEACMS.Demo.Models;

namespace ZKEACMS.Demo.Controllers
{
    [DefaultAuthorize(Policy = PermissionKeys.ViewDemo)]
    public class DemoController : Controller// BasicController<Models.TestEntity, int, IDemoService>
    {
        public DemoController(IDemoService service) //: base(service) 11111
        {
        }

        // GET: Home
        public IActionResult Index()
        {
            return View();
        }

        //[HttpPost, DefaultAuthorize(Policy = PermissionKeys.ManageDemo)]
        //public override IActionResult Edit(Models.TestEntity entity)
        //{
        //    return base.Edit(entity);
        //}

        //[HttpPost, DefaultAuthorize(Policy = PermissionKeys.ManageDemo)]
        //public override IActionResult Create(Models.TestEntity entity)
        //{
        //    return base.Create(entity);
        //}

        //[HttpPost, DefaultAuthorize(Policy = PermissionKeys.ManageDemo)]
        //public override IActionResult Delete(int id)
        //{
        //    return base.Delete(id);
        //}
    }
}